package cn.edu.javaweb.adminServlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.javaweb.service.AdminPassService;
import cn.edu.javaweb.utils.DBUtil;

/**
 * Servlet implementation class Pass
 */
@WebServlet("/Pass")
public class Pass extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	private AdminPassService pass=new AdminPassService();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		this.doPost(request, response);
	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String id=request.getParameter("id");
		String name=request.getParameter("name");
		String tel=request.getParameter("telephone");
		String sex=request.getParameter("sex");
		String password=request.getParameter("password");
		String uclass=request.getParameter("uclass");
		int result=pass.getPass(id);
		int result09=pass.getAdd(name, password, uclass, sex, tel);
		response.sendRedirect("/Volunteer/Examine");

	}

}
